/**
 * 
 */
package com.dfhc.pub.service;

import com.dfhc.pub.vo.SequenceVo;

/**
 * @author longsebo
 * 序列服务接口
 */
public interface ISequenceService {
	public final static String TABLE_NAME = "BASE_IMPULSE_SENDER";
	// 日期字段名
	public final static String FIELD_DATE = "update_date";
	// 当期值字段名
	public final static String FIELD_CURRENT_VALUE = "current_value";
	// 序列值长度
	public final static String FIELD_SEQUENCE_LEN = "sequence_len";
	// 当期格式化后序列值
	public final static String FIELD_CURRENT_FMT_VALUE = "current_fmt_value";
	// 序列化格式规则
	public final static String FIELD_SEQUENCE_RULE = "sequence_rule";
	// 序列名称
	public final static String FIELD_SEQUENCE = "sequence_name";
	// 周期类型
	public final static String FIELD_CYCLE_TYPE = "cycle_type";
	// 备注
	public final static String FIELD_REMARK = "remark";
	// 格式序列化值串
	public final static String FMT_SEQ_VALUE = "%value";	
	/**
	 * 批量获取序列
	 * @param size
	 * @param sequenceName
	 * @param args
	 * @return
	 */
	public String[] doGetNextSequenceValue(int size,String sequenceName, Object... args) ;
	/**
	 * 获取单个序列值
	 * @param sequenceName
	 * @param args
	 * @return
	 */
	public String doGetNextSequenceValue(String sequenceName, Object... args);
	/**
	 * 判断序列是否存在
	 * @param sequenceName
	 * @return
	 */
	public boolean isExistsSequence(String sequenceName);
	/**
	 * 插入序列
	 * @param vo
	 */
	public void insert(SequenceVo vo);
	/**
     * 获取表主键
     * @param tableName
     * @return
     */
    public  String getTablePK(String tableName);
}
